/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.comut.crud.ejb.interfaces;

import com.comut.crud.pojo.mobile.TrailerDetail;
import com.comut.crud.pojo.mobile.TrailerInfo;
import com.comut.crud.pojo.trailer.Trailer;
import com.comut.lib.exception.ObjectFoundException;
import com.comut.lib.exception.ObjectNotFoundException;
import javax.jws.WebMethod;

/**
 *
 * @author asantos
 */
//@WebService(targetNamespace = "http://ws.crud.comut.com/")
//@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public interface ITrailerAction {

    /**
     * Inserts Trailer on the database
     *
     * @param trailer the {@link Trailer} to be inserted
     * @return the inserted {@link Trailer}
     */
    @WebMethod
    public Trailer insertTrailer(Trailer trailer) throws ObjectFoundException;

    /**
     * Deletes a trailer from the database
     *
     * @param trailer the {@link Trailer} to be deleted
     */
    @WebMethod
    public void deleteTrailer(Trailer trailer) throws ObjectNotFoundException;

    /**
     * Update a event on the database
     *
     * @param trailer the update {@link Trailer}
     * @return the updated {@link Trailer}
     */
    @WebMethod
    public void updateTrailer(String trailer) throws ObjectNotFoundException;

    /**
     * Gets a trailer from the database
     *
     * @param trailer the {@link Trailer} to be found
     * @return the {@link Trailer} found
     */
    @WebMethod
    public Trailer getTrailer(Trailer trailer) throws ObjectNotFoundException;

    /**
     * Issue: IFL-1572
     *
     * @param userId
     * @return
     */
    @WebMethod
    public TrailerInfo[] getTrailersForUserId(int userId);
    
    /**
     * Issue: IFL-1573
     * @param userId
     * @param trailerId
     * @return 
     */
    @WebMethod
    public TrailerDetail getTrailerDetail(int userId, int trailerId);
}
